<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>{{groupId}}</groupId>
    <artifactId>{{artifactId}}</artifactId>
    <packaging>pom</packaging>
    <name>{{artifactId}}</name>
    <version>{{artifactVersion}}</version>
    
    <modules>
        <module>{{modelModuleArtifactId}}</module>
        <module>{{apiModuleArtifactId}}</module>
    </modules>
    
    <properties>
        <java.version>{{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}}</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <slf4j-version>1.7.21</slf4j-version>
        <junit-version>4.12</junit-version>
        <servlet-api-version>2.5</servlet-api-version>
        <springfox-version>2.4.0</springfox-version>
        <jackson-version>2.4.5</jackson-version>
        <spring-version>4.2.6.RELEASE</spring-version>
        <hibernate-validator-version>5.2.4.Final</hibernate-validator-version>
        <io.swagger.version>2.2.1-SNAPSHOT-WECLOUD<io.swagger.version>
    </properties>
    
    <build>
    	<pluginManagement>
			<plugins>
				<plugin>
					<groupId>io.swagger</groupId>
					<artifactId>swagger-codegen-maven-plugin</artifactId>
					<version>${io.swagger.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>
        <plugins>
            <plugin>
				<groupId>io.swagger</groupId>
				<artifactId>swagger-codegen-maven-plugin</artifactId>
				<configuration>
					<output>./</output>
					<groupId>{{groupId}}</groupId>
					<artifactId>{{artifactId}}</artifactId>
					
					<additional-properties>
						basePackage={{basePackage}},
						,modelModuleArtifactId={{modelModuleArtifactId}},
						,apiModuleArtifactId={{apiModuleArtifactId}},
						,componentTags=component
					</additional-properties>
					
					<inputSpec>swagger.yaml</inputSpec>
					<language>spring-mvc-wecloud</language>
					<library>spring-mvc</library>
				</configuration>
			</plugin>
        </plugins>
    </build>
    
    <dependencyManagement>
    	<dependencies>
    		<!-- commons -->
			<dependency>
				<groupId>com.wisedu.wecloud</groupId>
				<artifactId>wecloud-commons</artifactId>
				<version>0.0.1</version>
			</dependency>
    	
	        <dependency>
	            <groupId>org.slf4j</groupId>
	            <artifactId>slf4j-log4j12</artifactId>
	            <version>${slf4j-version}</version>
	        </dependency>
	
	        <!--Spring dependencies -->
	        <dependency>
	            <groupId>org.springframework</groupId>
	            <artifactId>spring-core</artifactId>
	            <version>${spring-version}</version>
	        </dependency>
	        <dependency>
	            <groupId>org.springframework</groupId>
	            <artifactId>spring-webmvc</artifactId>
	            <version>${spring-version}</version>
	        </dependency>
	        <dependency>
	            <groupId>org.springframework</groupId>
	            <artifactId>spring-web</artifactId>
	            <version>${spring-version}</version>
	        </dependency>
	
	        <dependency>
				<groupId>io.swagger</groupId>
		        <artifactId>swagger-annotations</artifactId>
		        <version>1.5.9</version>
			</dependency>
	
	        {{#java8}}
	        <dependency>
	            <groupId>com.fasterxml.jackson.datatype</groupId>
	            <artifactId>jackson-datatype-jsr310</artifactId>
	            <version>${jackson-version}</version>
	        </dependency>
	        {{/java8}}
	        {{^java8}}
	        <dependency>
	            <groupId>com.fasterxml.jackson.datatype</groupId>
	            <artifactId>jackson-datatype-joda</artifactId>
	            <version>${jackson-version}</version>
	        </dependency>
	        <dependency>
	            <groupId>joda-time</groupId>
	            <artifactId>joda-time</artifactId>
	            <version>2.9.4</version>
	        </dependency>
	        {{/java8}}
	        
	        <dependency>
			    <groupId>org.hibernate</groupId>
			    <artifactId>hibernate-validator</artifactId>
			    <version>${hibernate-validator-version}</version>
			</dependency>
	
	        <dependency>
	            <groupId>junit</groupId>
	            <artifactId>junit</artifactId>
	            <version>${junit-version}</version>
	            <scope>test</scope>
	        </dependency>
	        <dependency>
	            <groupId>javax.servlet</groupId>
	            <artifactId>servlet-api</artifactId>
	            <version>${servlet-api-version}</version>
	        </dependency>
	    </dependencies>
	</dependencyManagement>	    

</project>
